package leecode

func firstPalindrome(words []string) (result string) {
	for i := 0; i < len(words); i++ {
		str := []rune(words[i])
		for left, right := 0, len(str)-1; left < right; left, right = left+1, right-1 {
			str[left], str[right] = str[right], str[left]
		}
		if words[i] == string(str) {
			return words[i]
		}
	}
	return
}
